home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / ab20 / ab20_archive / datacomm / xpr / xprkermit-1.111.lzh / xprkermit.h < prev    next >
C/C++ Source or Header  |  1991-11-08  |  2KB  |  78 lines

  1. #ifndef XPRKERMIT_H
  2.  
  3. #define XPRKERMIT_H    1
  4.  
  5. /*
  6.  * $Header: Work:src/xprkermit/RCS/xprkermit.h,v 1.3 91/11/09 06:55:40 swalton Exp Locker: swalton $
  7.  */
  8.  
  9. #include "xproto.h"
  10.  
  11. /*
  12.  * The abstract data type for setting up XPR Kermit.
  13.  */
  14.  
  15. typedef struct {
  16.     void *DataSeg;            /* ADDITION--Data segment for reentrancy */
  17.     char FileName[256];
  18.     int ParityFlag,
  19.     TextFlag,
  20.     ConvertFlag,
  21.     MaxPacket,
  22.     BlockCheckType,
  23.     RetryLimit,
  24.     Timeout,
  25.     KeepFlag,
  26.     GetFlag;
  27. } SetupVars;
  28.  
  29. /* xprkermit.c */
  30. long XProtocolSend(struct XPR_IO *IO);
  31. long XProtocolReceive(struct XPR_IO *IO);
  32. long XProtocolSetup(struct XPR_IO *IO);
  33. int SetupFromString(struct XPR_IO *IO, char *s, SetupVars *sv);
  34. long XProtocolCleanup(struct XPR_IO *IO);
  35. int XPRParity(struct XPR_IO *IO);
  36. void XPRLong(struct XPR_IO *IO, long i);
  37. void ioerr(struct XPR_IO *IO, char *msg);
  38.  
  39. #pragma regcall(SetupFromString(a0, a1, a2))
  40. #pragma regcall(XPRParity(a0))
  41. #pragma regcall(XPRLong(a0, d0))
  42. #pragma regcall(ioerr(a0,a1))
  43.  
  44. /*
  45.  * The structure for XProtocolBase.  Now we need to know about this.
  46.  */
  47.  
  48. #include <exec/libraries.h>
  49.  
  50. struct XProtocolBase {
  51.     struct Library xp_Lib;
  52.     unsigned long xp_SegList;
  53. };
  54. /*
  55.  * Pragmas for the user-callable functions.  No more stubs for me!
  56.  */
  57.  
  58. #pragma amicall(XProtocolBase, 0x1e, XProtocolCleanup(a0))
  59. #pragma amicall(XProtocolBase, 0x24, XProtocolSetup(a0))
  60. #pragma amicall(XProtocolBase, 0x2a, XProtocolSend(a0))
  61. #pragma amicall(XProtocolBase, 0x30, XProtocolReceive(a0))
  62.  
  63. /*
  64.  * Prototypes for the callbacks.  We can't use amicall pragmas, sigh.
  65.  */
  66.  
  67. long calla(long (*f)(), void *);
  68. long calld(long (*f)(), long);
  69. long callda(long (*f)(), long, void *);
  70. long callaa(long (*f)(), void *, void *);
  71. long callad(long (*f)(), void *, long);
  72. long calladd(long (*f)(), void *, long, long);
  73. long calldaa(long (*f)(), long, void *, void *);
  74. long calladda(long (*f)(), void *, long, long, void *);
  75.  
  76.  
  77. #endif
  78.